import React, { Component } from 'react';
import MyContainer from './MyContainer2';
class Demo2 extends Component {
  constructor (props) {
    super(props);
    this.state = {
      text: 'aaa'
    }
  }
  fn () {
    console.log(this.state.text);
  }
  fnChange (e) {
    this.setState({text: e.target.value});
  }
  render() {
    return (
      <div>
        <h2>反向继承</h2>
        <div>{this.props.login.toString()}</div>
        {/* // <input type="text"/> */}
        <input type="text" value={this.state.text} onChange={this.fnChange.bind(this)}/>
      </div>
    );
  }

}

export default MyContainer(Demo2);
